package com.hjy.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class RegisterVo {
    @NotNull(message = "账号非空")
    @Length(min = 3,max = 18,message = "账号长度在 3 到 18 位")
    private String username;
    @NotNull(message = "密码非空")
    @Length(min = 3,max = 18,message = "密码长度在 3 到 18 位")
    private String password;
    @Pattern(regexp = "^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}",message = "必须是一个合法手机号")
    private String phone;
    @NotNull(message = "验证码非空")
    private String code;
}
